<?php
include "Class/EasyMySQL.php";

$mysql = new EasyMySQL();
if(!$mysql->Connect())  return;

$method = $_REQUEST["Method"];
$data = file_get_contents('php://input', 'r');
$data = iconv("GB2312", "UTF-8//IGNORE", $data);

if($method == "Select")
{
    $mysql->Select("DeviceTime")->WhereSelect($data)->QuerySelect();
}
else if($method == "Insert")
{
    $mysql->Insert("DeviceTime")->InsertColumns("DeviceUID,Time")->InsertValues($data, 2)->QueryInsert();
}
else if($method == "Update")
{

}
else if($method == "Delete")
{
    $mysql->Delete("DeviceTime")->WhereDelete("DeviceUID", $data)->Query();
}

$mysql->Close();
?>